home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 16 code / CollaboDraw.sea / CollaboDraw / commands.c < prev    next >
MacBinary  |  1993-08-24  |  11.5 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Aug 24 15:23:50 1993, modified Tue Aug 24 15:23:50 1993, creator 'MPS ', type ASCII, 11076 bytes "commands.c" , at 0x2bc4 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 63 6f 6d 6d 61 6e | 64 73 2e 63 00 00 00 00 |..comman|ds.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 2b 44 00 | 00 01 ac a8 a0 1b 46 a8 |.....+D.|......F.|
|00000060| a0 1b 46 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..F.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1f 33 00 00 |........|.....3..|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000d0| 2d 2d 2d 2d 2d 2d 2d 0d | 20 2a 0d 20 2a 20 53 69 |-------.| *. * Si|
|000000e0| 6d 70 6c 65 20 53 61 6d | 70 6c 65 20 50 6f 77 65 |mple Sam|ple Powe|
|000000f0| 72 54 61 6c 6b 20 41 70 | 70 6c 69 63 61 74 69 6f |rTalk Ap|plicatio|
|00000100| 6e 20 46 72 61 6d 65 77 | 6f 72 6b 0d 20 2a 0d 20 |n Framew|ork. *. |
|00000110| 2a 20 a9 31 39 39 31 2d | 31 39 39 33 20 41 70 70 |* .1991-|1993 App|
|00000120| 6c 65 20 43 6f 6d 70 75 | 74 65 72 0d 20 2a 0d 20 |le Compu|ter. *. |
|00000130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000170| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000180| 2d 2d 2d 2d 2d 2a 2f 0d | 2f 2a 0d 20 2a 20 63 6f |-----*/.|/*. * co|
|00000190| 6d 6d 61 6e 64 73 2e 63 | 20 2d 2d 20 63 61 6c 6c |mmands.c| -- call|
|000001a0| 65 64 20 69 6e 20 72 65 | 73 70 6f 6e 73 65 20 74 |ed in re|sponse t|
|000001b0| 6f 20 6d 65 6e 75 20 63 | 6f 6d 6d 61 6e 64 73 20 |o menu c|ommands |
|000001c0| 6f 72 20 61 70 70 6c 65 | 65 76 65 6e 74 73 0d 20 |or apple|events. |
|000001d0| 2a 0d 20 2a 20 63 68 61 | 6e 67 65 20 68 69 73 74 |*. * cha|nge hist|
|000001e0| 6f 72 79 3a 0d 20 2a 0d | 20 2a 20 53 4a 46 09 09 |ory:. *.| * SJF..|
|000001f0| 30 38 2f 32 33 2f 39 33 | 09 09 31 2e 30 66 31 09 |08/23/93|..1.0f1.|
|00000200| 09 75 70 64 61 74 65 20 | 74 6f 20 66 69 6e 61 6c |.update |to final|
|00000210| 20 68 65 61 64 65 72 73 | 2c 20 66 69 78 20 63 6f | headers|, fix co|
|00000220| 6d 6d 65 6e 74 73 0d 20 | 2a 20 53 4a 46 09 09 30 |mments. |* SJF..0|
|00000230| 34 2f 32 31 2f 39 33 09 | 09 31 2e 30 62 32 09 09 |4/21/93.|.1.0b2..|
|00000240| 75 70 64 61 74 65 20 74 | 6f 20 62 32 0d 20 2a 20 |update t|o b2. * |
|00000250| 53 4a 46 09 09 30 33 2f | 30 31 2f 39 33 09 09 31 |SJF..03/|01/93..1|
|00000260| 2e 30 62 31 09 09 61 64 | 64 65 64 20 64 69 67 69 |.0b1..ad|ded digi|
|00000270| 74 61 6c 20 73 69 67 6e | 61 74 75 72 65 73 0d 20 |tal sign|atures. |
|00000280| 2a 20 53 4a 46 09 09 30 | 32 2f 30 39 2f 39 33 09 |* SJF..0|2/09/93.|
|00000290| 09 31 2e 30 62 31 09 09 | 75 70 64 61 74 65 20 74 |.1.0b1..|update t|
|000002a0| 6f 20 62 31 0d 20 2a 20 | 53 4a 46 09 09 31 30 2f |o b1. * |SJF..10/|
|000002b0| 31 33 2f 39 32 09 09 31 | 2e 30 64 34 09 09 75 70 |13/92..1|.0d4..up|
|000002c0| 64 61 74 65 20 74 6f 20 | 61 31 31 0d 20 2a 20 53 |date to |a11. * S|
|000002d0| 4a 46 09 09 30 39 2f 30 | 39 2f 39 32 09 09 31 2e |JF..09/0|9/92..1.|
|000002e0| 30 64 33 09 09 75 70 64 | 61 74 65 20 74 6f 20 61 |0d3..upd|ate to a|
|000002f0| 39 0d 20 2a 20 53 4a 46 | 09 09 30 35 2f 30 37 2f |9. * SJF|..05/07/|
|00000300| 39 32 09 09 31 2e 30 64 | 32 09 09 75 70 64 61 74 |92..1.0d|2..updat|
|00000310| 65 20 74 6f 20 61 36 0d | 20 2a 20 53 4a 46 09 09 |e to a6.| * SJF..|
|00000320| 31 31 2f 30 36 2f 39 31 | 09 09 31 2e 30 64 31 09 |11/06/91|..1.0d1.|
|00000330| 09 69 6e 69 74 69 61 6c | 20 63 6f 64 69 6e 67 0d |.initial| coding.|
|00000340| 20 2a 0d 20 2a 2f 0d 0d | 23 69 66 6e 64 65 66 20 | *. */..|#ifndef |
|00000350| 5f 5f 54 59 50 45 53 5f | 5f 0d 23 69 6e 63 6c 75 |__TYPES_|_.#inclu|
|00000360| 64 65 20 3c 54 79 70 65 | 73 2e 68 3e 0d 23 65 6e |de <Type|s.h>.#en|
|00000370| 64 69 66 0d 0d 23 69 66 | 6e 64 65 66 20 5f 5f 44 |dif..#if|ndef __D|
|00000380| 49 41 4c 4f 47 53 5f 5f | 0d 23 69 6e 63 6c 75 64 |IALOGS__|.#includ|
|00000390| 65 20 3c 44 69 61 6c 6f | 67 73 2e 68 3e 0d 23 65 |e <Dialo|gs.h>.#e|
|000003a0| 6e 64 69 66 0d 0d 23 69 | 66 6e 64 65 66 20 5f 5f |ndif..#i|fndef __|
|000003b0| 43 4f 4e 54 52 4f 4c 53 | 5f 5f 0d 23 69 6e 63 6c |CONTROLS|__.#incl|
|000003c0| 75 64 65 20 3c 43 6f 6e | 74 72 6f 6c 73 2e 68 3e |ude <Con|trols.h>|
|000003d0| 0d 23 65 6e 64 69 66 0d | 0d 23 69 66 6e 64 65 66 |.#endif.|.#ifndef|
|000003e0| 20 5f 5f 4d 45 4e 55 53 | 5f 5f 0d 23 69 6e 63 6c | __MENUS|__.#incl|
|000003f0| 75 64 65 20 3c 4d 65 6e | 75 73 2e 68 3e 0d 23 65 |ude <Men|us.h>.#e|
|00000400| 6e 64 69 66 0d 0d 23 69 | 66 6e 64 65 66 20 5f 5f |ndif..#i|fndef __|
|00000410| 53 54 41 4e 44 41 52 44 | 46 49 4c 45 5f 5f 0d 23 |STANDARD|FILE__.#|
|00000420| 69 6e 63 6c 75 64 65 20 | 3c 53 74 61 6e 64 61 72 |include |<Standar|
|00000430| 64 46 69 6c 65 2e 68 3e | 0d 23 65 6e 64 69 66 0d |dFile.h>|.#endif.|
|00000440| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 46 49 4c 45 53 |.#ifndef| __FILES|
|00000450| 5f 5f 0d 23 69 6e 63 6c | 75 64 65 20 3c 46 69 6c |__.#incl|ude <Fil|
|00000460| 65 73 2e 68 3e 0d 23 65 | 6e 64 69 66 0d 0d 23 69 |es.h>.#e|ndif..#i|
|00000470| 66 6e 64 65 66 20 5f 5f | 53 43 52 49 50 54 5f 5f |fndef __|SCRIPT__|
|00000480| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 53 63 72 69 70 |.#includ|e <Scrip|
|00000490| 74 2e 68 3e 0d 23 65 6e | 64 69 66 0d 0d 23 69 66 |t.h>.#en|dif..#if|
|000004a0| 6e 64 65 66 20 5f 5f 4f | 43 45 4d 41 49 4c 5f 5f |ndef __O|CEMAIL__|
|000004b0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 4f 43 45 4d 61 |.#includ|e <OCEMa|
|000004c0| 69 6c 2e 68 3e 0d 23 65 | 6e 64 69 66 0d 0d 23 69 |il.h>.#e|ndif..#i|
|000004d0| 66 6e 64 65 66 20 5f 5f | 4f 43 45 53 54 41 4e 44 |fndef __|OCESTAND|
|000004e0| 41 52 44 4d 41 49 4c 5f | 5f 0d 23 69 6e 63 6c 75 |ARDMAIL_|_.#inclu|
|000004f0| 64 65 20 3c 4f 43 45 53 | 74 61 6e 64 61 72 64 4d |de <OCES|tandardM|
|00000500| 61 69 6c 2e 68 3e 0d 23 | 65 6e 64 69 66 0d 0d 23 |ail.h>.#|endif..#|
|00000510| 69 6e 63 6c 75 64 65 20 | 22 63 6f 6e 73 74 2e 68 |include |"const.h|
|00000520| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 73 74 72 63 |".#inclu|de "strc|
|00000530| 6f 6e 73 74 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |onst.h".|#include|
|00000540| 20 22 6d 79 6d 65 6e 75 | 73 2e 68 22 0d 23 69 6e | "mymenu|s.h".#in|
|00000550| 63 6c 75 64 65 20 22 6d | 79 74 79 70 65 73 2e 68 |clude "m|ytypes.h|
|00000560| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 67 6c 6f 62 |".#inclu|de "glob|
|00000570| 61 6c 73 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |als.h".#|include |
|00000580| 22 75 74 69 6c 73 2e 68 | 22 0d 23 69 6e 63 6c 75 |"utils.h|".#inclu|
|00000590| 64 65 20 22 77 69 6e 64 | 6f 77 73 74 75 66 66 2e |de "wind|owstuff.|
|000005a0| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 6d 79 73 |h".#incl|ude "mys|
|000005b0| 74 61 6e 64 61 72 64 6d | 61 69 6c 2e 68 22 0d 0d |tandardm|ail.h"..|
|000005c0| 23 69 6e 63 6c 75 64 65 | 20 22 63 6f 6d 6d 61 6e |#include| "comman|
|000005d0| 64 73 2e 68 22 0d 0d 2f | 2a 20 63 6c 6f 73 65 73 |ds.h"../|* closes|
|000005e0| 20 61 20 77 69 6e 64 6f | 77 20 69 6e 20 72 65 73 | a windo|w in res|
|000005f0| 70 6f 6e 73 65 20 74 6f | 20 74 68 65 20 46 69 6c |ponse to| the Fil|
|00000600| 65 3a 43 6c 6f 73 65 20 | 6d 65 6e 75 20 69 74 65 |e:Close |menu ite|
|00000610| 6d 20 2a 2f 0d 0d 76 6f | 69 64 20 43 6f 6d 6d 43 |m */..vo|id CommC|
|00000620| 6c 6f 73 65 57 69 6e 64 | 6f 77 28 57 69 6e 64 6f |loseWind|ow(Windo|
|00000630| 77 50 74 72 20 77 69 6e | 64 6f 77 29 0d 7b 0d 09 |wPtr win|dow).{..|
|00000640| 57 49 6e 66 6f 48 6e 64 | 6c 20 69 6e 66 6f 48 6e |WInfoHnd|l infoHn|
|00000650| 64 6c 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 73 68 6f |dl;..Boo|lean sho|
|00000660| 75 6c 64 43 6c 6f 73 65 | 3b 0d 09 0d 09 69 66 20 |uldClose|;....if |
|00000670| 28 21 49 73 41 70 70 57 | 69 6e 64 6f 77 28 77 69 |(!IsAppW|indow(wi|
|00000680| 6e 64 6f 77 29 29 0d 09 | 09 72 65 74 75 72 6e 3b |ndow))..|.return;|
|00000690| 0d 09 09 0d 09 69 6e 66 | 6f 48 6e 64 6c 20 3d 20 |.....inf|oHndl = |
|000006a0| 47 65 74 57 69 6e 64 6f | 77 49 6e 66 6f 28 77 69 |GetWindo|wInfo(wi|
|000006b0| 6e 64 6f 77 29 3b 0d 09 | 0d 09 69 66 20 28 21 43 |ndow);..|..if (!C|
|000006c0| 61 6e 43 6c 6f 73 65 4c | 65 74 74 65 72 28 77 69 |anCloseL|etter(wi|
|000006d0| 6e 64 6f 77 29 29 09 2f | 2f 20 73 65 65 20 69 66 |ndow))./|/ see if|
|000006e0| 20 77 65 27 72 65 20 61 | 6c 6c 6f 77 65 64 20 74 | we're a|llowed t|
|000006f0| 6f 20 63 6c 6f 73 65 20 | 74 68 65 20 6c 65 74 74 |o close |the lett|
|00000700| 65 72 0d 09 09 73 68 6f | 75 6c 64 43 6c 6f 73 65 |er...sho|uldClose|
|00000710| 20 3d 20 66 61 6c 73 65 | 3b 0d 09 65 6c 73 65 20 | = false|;..else |
|00000720| 7b 0d 09 09 69 66 20 28 | 28 2a 2a 69 6e 66 6f 48 |{...if (|(**infoH|
|00000730| 6e 64 6c 29 2e 63 68 61 | 6e 67 65 64 29 0d 09 09 |ndl).cha|nged)...|
|00000740| 09 73 68 6f 75 6c 64 43 | 6c 6f 73 65 20 3d 20 57 |.shouldC|lose = W|
|00000750| 61 72 6e 4f 6e 57 69 6e | 64 6f 77 43 6c 6f 73 65 |arnOnWin|dowClose|
|00000760| 28 77 69 6e 64 6f 77 29 | 3b 09 2f 2f 20 73 65 65 |(window)|;.// see|
|00000770| 20 69 66 20 75 73 65 72 | 20 72 65 61 6c 6c 79 20 | if user| really |
|00000780| 77 61 6e 74 73 20 74 6f | 20 63 6c 6f 73 65 20 6c |wants to| close l|
|00000790| 65 74 74 65 72 0d 09 09 | 65 6c 73 65 0d 09 09 09 |etter...|else....|
|000007a0| 73 68 6f 75 6c 64 43 6c | 6f 73 65 20 3d 20 74 72 |shouldCl|ose = tr|
|000007b0| 75 65 3b 0d 09 7d 0d 09 | 0d 09 69 66 20 28 73 68 |ue;..}..|..if (sh|
|000007c0| 6f 75 6c 64 43 6c 6f 73 | 65 29 20 7b 0d 09 09 53 |ouldClos|e) {...S|
|000007d0| 65 6e 64 57 69 6e 64 6f | 77 4d 65 73 73 61 67 65 |endWindo|wMessage|
|000007e0| 28 77 69 6e 64 6f 77 2c | 6b 44 65 61 63 74 69 76 |(window,|kDeactiv|
|000007f0| 61 74 65 4d 65 73 73 61 | 67 65 2c 6e 69 6c 29 3b |ateMessa|ge,nil);|
|00000800| 09 2f 2f 20 73 65 6e 64 | 20 77 69 6e 64 6f 77 20 |.// send| window |
|00000810| 61 20 64 65 61 63 74 69 | 76 61 74 65 20 6d 65 73 |a deacti|vate mes|
|00000820| 73 61 67 65 0d 09 09 53 | 65 6e 64 57 69 6e 64 6f |sage...S|endWindo|
|00000830| 77 4d 65 73 73 61 67 65 | 28 77 69 6e 64 6f 77 2c |wMessage|(window,|
|00000840| 6b 44 65 73 74 72 6f 79 | 4d 65 73 73 61 67 65 2c |kDestroy|Message,|
|00000850| 6e 69 6c 29 3b 09 09 2f | 2f 20 73 65 6e 74 20 77 |nil);../|/ sent w|
|00000860| 69 6e 64 6f 77 20 61 20 | 64 65 73 74 72 6f 79 20 |indow a |destroy |
|00000870| 6d 65 73 73 61 67 65 0d | 09 09 0d 09 09 44 69 73 |message.|.....Dis|
|00000880| 70 6f 73 48 61 6e 64 6c | 65 43 68 6b 28 69 6e 66 |posHandl|eChk(inf|
|00000890| 6f 48 6e 64 6c 29 3b 09 | 0d 09 09 44 69 73 70 6f |oHndl);.|...Dispo|
|000008a0| 73 65 57 69 6e 64 6f 77 | 28 77 69 6e 64 6f 77 29 |seWindow|(window)|
|000008b0| 3b 0d 09 7d 0d 09 65 6c | 73 65 20 67 44 6f 6e 65 |;..}..el|se gDone|
|000008c0| 20 3d 20 66 61 6c 73 65 | 3b 09 2f 2f 20 77 65 20 | = false|;.// we |
|000008d0| 6d 69 67 68 74 20 62 65 | 20 71 75 69 74 74 69 6e |might be| quittin|
|000008e0| 67 2c 20 73 6f 20 77 65 | 27 64 20 77 61 6e 74 20 |g, so we|'d want |
|000008f0| 74 6f 20 61 62 6f 72 74 | 20 74 68 61 74 0d 7d 0d |to abort| that.}.|
|00000900| 0d 0d 2f 2a 20 70 72 6f | 63 65 73 73 65 73 20 65 |../* pro|cesses e|
|00000910| 64 69 74 20 6d 65 6e 75 | 20 63 6f 6d 6d 61 6e 64 |dit menu| command|
|00000920| 73 20 2a 2f 0d 0d 76 6f | 69 64 20 43 6f 6d 6d 45 |s */..vo|id CommE|
|00000930| 64 69 74 28 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |dit(Wind|owPtr wi|
|00000940| 6e 64 6f 77 2c 73 68 6f | 72 74 20 63 6f 6d 6d 61 |ndow,sho|rt comma|
|00000950| 6e 64 29 0d 7b 0d 09 73 | 68 6f 72 74 20 6d 73 67 |nd).{..s|hort msg|
|00000960| 3b 0d 09 0d 09 69 66 20 | 28 21 49 73 41 70 70 57 |;....if |(!IsAppW|
|00000970| 69 6e 64 6f 77 28 77 69 | 6e 64 6f 77 29 29 0d 09 |indow(wi|ndow))..|
|00000980| 09 72 65 74 75 72 6e 3b | 0d 0d 09 73 77 69 74 63 |.return;|...switc|
|00000990| 68 20 28 63 6f 6d 6d 61 | 6e 64 29 20 7b 0d 09 09 |h (comma|nd) {...|
|000009a0| 63 61 73 65 20 6b 55 6e | 64 6f 49 74 65 6d 3a 0d |case kUn|doItem:.|
|000009b0| 09 09 09 6d 73 67 20 3d | 20 6b 55 6e 64 6f 4d 65 |...msg =| kUndoMe|
|000009c0| 73 73 61 67 65 3b 0d 09 | 09 09 62 72 65 61 6b 3b |ssage;..|..break;|
|000009d0| 0d 09 09 63 61 73 65 20 | 6b 43 75 74 49 74 65 6d |...case |kCutItem|
|000009e0| 3a 0d 09 09 09 6d 73 67 | 20 3d 20 6b 43 75 74 4d |:....msg| = kCutM|
|000009f0| 65 73 73 61 67 65 3b 0d | 09 09 09 62 72 65 61 6b |essage;.|...break|
|00000a00| 3b 0d 09 09 63 61 73 65 | 20 6b 43 6f 70 79 49 74 |;...case| kCopyIt|
|00000a10| 65 6d 3a 0d 09 09 09 6d | 73 67 20 3d 20 6b 43 6f |em:....m|sg = kCo|
|00000a20| 70 79 4d 65 73 73 61 67 | 65 3b 0d 09 09 09 62 72 |pyMessag|e;....br|
|00000a30| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 6b 50 61 73 |eak;...c|ase kPas|
|00000a40| 74 65 49 74 65 6d 3a 0d | 09 09 09 6d 73 67 20 3d |teItem:.|...msg =|
|00000a50| 20 6b 50 61 73 74 65 4d | 65 73 73 61 67 65 3b 0d | kPasteM|essage;.|
|00000a60| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00000a70| 20 6b 43 6c 65 61 72 49 | 74 65 6d 3a 0d 09 09 09 | kClearI|tem:....|
|00000a80| 6d 73 67 20 3d 20 6b 43 | 6c 65 61 72 4d 65 73 73 |msg = kC|learMess|
|00000a90| 61 67 65 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |age;....|break;..|
|00000aa0| 09 63 61 73 65 20 6b 53 | 65 6c 65 63 74 41 6c 6c |.case kS|electAll|
|00000ab0| 49 74 65 6d 3a 0d 09 09 | 09 6d 73 67 20 3d 20 6b |Item:...|.msg = k|
|00000ac0| 53 65 6c 65 63 74 41 6c | 6c 4d 65 73 73 61 67 65 |SelectAl|lMessage|
|00000ad0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 64 65 |;....bre|ak;...de|
|00000ae0| 66 61 75 6c 74 3a 0d 09 | 09 09 72 65 74 75 72 6e |fault:..|..return|
|00000af0| 3b 0d 09 7d 0d 09 53 65 | 6e 64 57 69 6e 64 6f 77 |;..}..Se|ndWindow|
|00000b00| 4d 65 73 73 61 67 65 28 | 77 69 6e 64 6f 77 2c 6d |Message(|window,m|
|00000b10| 73 67 2c 6e 69 6c 29 3b | 09 2f 2f 20 73 65 6e 64 |sg,nil);|.// send|
|00000b20| 20 74 68 65 20 65 64 69 | 74 20 6d 65 73 73 61 67 | the edi|t messag|
|00000b30| 65 20 74 6f 20 74 68 65 | 20 77 69 6e 64 6f 77 0d |e to the| window.|
|00000b40| 7d 0d 0d 0d 2f 2a 20 63 | 61 6c 6c 65 64 20 69 6e |}.../* c|alled in|
|00000b50| 20 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 74 68 65 | respons|e to the|
|00000b60| 20 75 73 65 72 20 73 65 | 6c 65 63 74 69 6e 67 20 | user se|lecting |
|00000b70| 74 68 65 20 22 50 72 65 | 66 65 72 65 6e 63 65 73 |the "Pre|ferences|
|00000b80| 2e 2e 2e 22 20 6d 65 6e | 75 20 69 74 65 6d 20 2a |..." men|u item *|
|00000b90| 2f 0d 2f 2a 20 64 69 73 | 70 6c 61 79 73 20 74 68 |/./* dis|plays th|
|00000ba0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 73 20 6d 6f |e prefer|ences mo|
|00000bb0| 64 61 6c 20 64 69 61 6c | 6f 67 20 61 6e 64 20 73 |dal dial|og and s|
|00000bc0| 61 76 65 73 20 74 68 65 | 20 63 68 61 6e 67 65 73 |aves the| changes|
|00000bd0| 20 69 6e 20 74 68 65 20 | 2a 2f 0d 2f 2a 20 67 50 | in the |*/./* gP|
|00000be0| 72 65 66 65 72 65 6e 63 | 65 73 20 67 6c 6f 62 61 |referenc|es globa|
|00000bf0| 6c 20 2a 2f 0d 0d 76 6f | 69 64 20 43 6f 6d 6d 45 |l */..vo|id CommE|
|00000c00| 64 69 74 50 72 65 66 65 | 72 65 6e 63 65 73 28 76 |ditPrefe|rences(v|
|00000c10| 6f 69 64 29 0d 7b 0d 09 | 44 69 61 6c 6f 67 50 74 |oid).{..|DialogPt|
|00000c20| 72 20 74 68 65 44 69 61 | 6c 6f 67 3b 0d 09 73 68 |r theDia|log;..sh|
|00000c30| 6f 72 74 20 69 54 79 70 | 65 3b 0d 09 48 61 6e 64 |ort iTyp|e;..Hand|
|00000c40| 6c 65 20 69 48 6e 64 6c | 3b 0d 09 52 65 63 74 20 |le iHndl|;..Rect |
|00000c50| 69 52 65 63 74 3b 0d 09 | 73 68 6f 72 74 20 69 74 |iRect;..|short it|
|00000c60| 65 6d 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 2a 70 72 |em;..Boo|lean *pr|
|00000c70| 65 66 53 77 69 74 63 68 | 50 74 72 3b 0d 09 4d 79 |efSwitch|Ptr;..My|
|00000c80| 50 72 65 66 65 72 65 6e | 63 65 73 20 6e 65 77 50 |Preferen|ces newP|
|00000c90| 72 65 66 65 72 65 6e 63 | 65 73 3b 0d 09 0d 09 42 |referenc|es;....B|
|00000ca0| 6c 6f 63 6b 4d 6f 76 65 | 28 26 67 50 72 65 66 65 |lockMove|(&gPrefe|
|00000cb0| 72 65 6e 63 65 73 2c 26 | 6e 65 77 50 72 65 66 65 |rences,&|newPrefe|
|00000cc0| 72 65 6e 63 65 73 2c 73 | 69 7a 65 6f 66 28 4d 79 |rences,s|izeof(My|
|00000cd0| 50 72 65 66 65 72 65 6e | 63 65 73 29 29 3b 0d 09 |Preferen|ces));..|
|00000ce0| 0d 09 74 68 65 44 69 61 | 6c 6f 67 20 3d 20 47 65 |..theDia|log = Ge|
|00000cf0| 74 4e 65 77 44 69 61 6c | 6f 67 28 6b 50 72 65 66 |tNewDial|og(kPref|
|00000d00| 73 44 69 61 6c 6f 67 49 | 44 2c 6e 69 6c 2c 28 57 |sDialogI|D,nil,(W|
|00000d10| 69 6e 64 6f 77 50 74 72 | 29 2d 31 4c 29 3b 0d 09 |indowPtr|)-1L);..|
|00000d20| 4d 79 44 72 61 77 44 65 | 66 61 75 6c 74 42 75 74 |MyDrawDe|faultBut|
|00000d30| 74 6f 6e 4f 75 74 6c 69 | 6e 65 28 74 68 65 44 69 |tonOutli|ne(theDi|
|00000d40| 61 6c 6f 67 2c 6f 6b 29 | 3b 0d 09 0d 09 2f 2f 20 |alog,ok)|;....// |
|00000d50| 73 65 74 20 75 70 20 6f | 75 72 20 64 69 61 6c 6f |set up o|ur dialo|
|00000d60| 67 20 77 69 74 68 20 74 | 68 65 20 69 6e 69 74 69 |g with t|he initi|
|00000d70| 61 6c 20 76 61 6c 75 65 | 73 0d 09 0d 09 47 65 74 |al value|s....Get|
|00000d80| 44 49 74 65 6d 28 74 68 | 65 44 69 61 6c 6f 67 2c |DItem(th|eDialog,|
|00000d90| 6b 43 6c 6f 73 65 41 66 | 74 65 72 53 61 76 65 2c |kCloseAf|terSave,|
|00000da0| 26 69 54 79 70 65 2c 26 | 69 48 6e 64 6c 2c 26 69 |&iType,&|iHndl,&i|
|00000db0| 52 65 63 74 29 3b 0d 09 | 53 65 74 43 74 6c 56 61 |Rect);..|SetCtlVa|
|00000dc0| 6c 75 65 28 28 43 6f 6e | 74 72 6f 6c 48 61 6e 64 |lue((Con|trolHand|
|00000dd0| 6c 65 29 69 48 6e 64 6c | 2c 6e 65 77 50 72 65 66 |le)iHndl|,newPref|
|00000de0| 65 72 65 6e 63 65 73 2e | 63 6c 6f 73 65 4f 6e 53 |erences.|closeOnS|
|00000df0| 65 6e 64 29 3b 0d 09 47 | 65 74 44 49 74 65 6d 28 |end);..G|etDItem(|
|00000e00| 74 68 65 44 69 61 6c 6f | 67 2c 6b 53 68 6f 77 43 |theDialo|g,kShowC|
|00000e10| 6c 6f 73 65 4f 70 74 69 | 6f 6e 73 2c 26 69 54 79 |loseOpti|ons,&iTy|
|00000e20| 70 65 2c 26 69 48 6e 64 | 6c 2c 26 69 52 65 63 74 |pe,&iHnd|l,&iRect|
|00000e30| 29 3b 0d 09 53 65 74 43 | 74 6c 56 61 6c 75 65 28 |);..SetC|tlValue(|
|00000e40| 28 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 29 69 |(Control|Handle)i|
|00000e50| 48 6e 64 6c 2c 6e 65 77 | 50 72 65 66 65 72 65 6e |Hndl,new|Preferen|
|00000e60| 63 65 73 2e 63 6c 6f 73 | 65 4f 70 74 69 6f 6e 73 |ces.clos|eOptions|
|00000e70| 44 69 61 6c 6f 67 29 3b | 0d 09 47 65 74 44 49 74 |Dialog);|..GetDIt|
|00000e80| 65 6d 28 74 68 65 44 69 | 61 6c 6f 67 2c 6b 45 78 |em(theDi|alog,kEx|
|00000e90| 70 61 6e 64 4d 61 69 6c | 65 72 43 72 65 61 74 65 |pandMail|erCreate|
|00000ea0| 2c 26 69 54 79 70 65 2c | 26 69 48 6e 64 6c 2c 26 |,&iType,|&iHndl,&|
|00000eb0| 69 52 65 63 74 29 3b 0d | 09 53 65 74 43 74 6c 56 |iRect);.|.SetCtlV|
|00000ec0| 61 6c 75 65 28 28 43 6f | 6e 74 72 6f 6c 48 61 6e |alue((Co|ntrolHan|
|00000ed0| 64 6c 65 29 69 48 6e 64 | 6c 2c 6e 65 77 50 72 65 |dle)iHnd|l,newPre|
|00000ee0| 66 65 72 65 6e 63 65 73 | 2e 65 78 70 61 6e 64 4f |ferences|.expandO|
|00000ef0| 6e 43 72 65 61 74 65 29 | 3b 0d 09 47 65 74 44 49 |nCreate)|;..GetDI|
|00000f00| 74 65 6d 28 74 68 65 44 | 69 61 6c 6f 67 2c 6b 45 |tem(theD|ialog,kE|
|00000f10| 78 70 61 6e 64 4d 61 69 | 6c 65 72 4f 70 65 6e 2c |xpandMai|lerOpen,|
|00000f20| 26 69 54 79 70 65 2c 26 | 69 48 6e 64 6c 2c 26 69 |&iType,&|iHndl,&i|
|00000f30| 52 65 63 74 29 3b 0d 09 | 53 65 74 43 74 6c 56 61 |Rect);..|SetCtlVa|
|00000f40| 6c 75 65 28 28 43 6f 6e | 74 72 6f 6c 48 61 6e 64 |lue((Con|trolHand|
|00000f50| 6c 65 29 69 48 6e 64 6c | 2c 6e 65 77 50 72 65 66 |le)iHndl|,newPref|
|00000f60| 65 72 65 6e 63 65 73 2e | 65 78 70 61 6e 64 4f 6e |erences.|expandOn|
|00000f70| 4f 70 65 6e 29 3b 0d 09 | 0d 09 2f 2f 20 6c 65 74 |Open);..|..// let|
|00000f80| 20 74 68 65 20 75 73 65 | 72 20 70 6c 61 79 20 77 | the use|r play w|
|00000f90| 69 74 68 20 74 68 65 20 | 64 69 61 6c 6f 67 0d 09 |ith the |dialog..|
|00000fa0| 0d 09 64 6f 20 7b 0d 09 | 09 4d 6f 64 61 6c 44 69 |..do {..|.ModalDi|
|00000fb0| 61 6c 6f 67 28 6e 69 6c | 2c 26 69 74 65 6d 29 3b |alog(nil|,&item);|
|00000fc0| 0d 09 09 69 66 20 28 69 | 74 65 6d 3e 3d 6b 43 6c |...if (i|tem>=kCl|
|00000fd0| 6f 73 65 41 66 74 65 72 | 53 61 76 65 20 26 26 20 |oseAfter|Save && |
|00000fe0| 69 74 65 6d 3c 3d 6b 45 | 78 70 61 6e 64 4d 61 69 |item<=kE|xpandMai|
|00000ff0| 6c 65 72 4f 70 65 6e 29 | 20 7b 0d 09 09 09 73 77 |lerOpen)| {....sw|
|00001000| 69 74 63 68 20 28 69 74 | 65 6d 29 20 7b 0d 09 09 |itch (it|em) {...|
|00001010| 09 09 63 61 73 65 20 6b | 43 6c 6f 73 65 41 66 74 |..case k|CloseAft|
|00001020| 65 72 53 61 76 65 3a 0d | 09 09 09 09 09 70 72 65 |erSave:.|.....pre|
|00001030| 66 53 77 69 74 63 68 50 | 74 72 20 3d 20 26 6e 65 |fSwitchP|tr = &ne|
|00001040| 77 50 72 65 66 65 72 65 | 6e 63 65 73 2e 63 6c 6f |wPrefere|nces.clo|
|00001050| 73 65 4f 6e 53 65 6e 64 | 3b 0d 09 09 09 09 09 62 |seOnSend|;......b|
|00001060| 72 65 61 6b 3b 0d 09 09 | 09 09 63 61 73 65 20 6b |reak;...|..case k|
|00001070| 53 68 6f 77 43 6c 6f 73 | 65 4f 70 74 69 6f 6e 73 |ShowClos|eOptions|
|00001080| 3a 0d 09 09 09 09 09 70 | 72 65 66 53 77 69 74 63 |:......p|refSwitc|
|00001090| 68 50 74 72 20 3d 20 26 | 6e 65 77 50 72 65 66 65 |hPtr = &|newPrefe|
|000010a0| 72 65 6e 63 65 73 2e 63 | 6c 6f 73 65 4f 70 74 69 |rences.c|loseOpti|
|000010b0| 6f 6e 73 44 69 61 6c 6f | 67 3b 0d 09 09 09 09 09 |onsDialo|g;......|
|000010c0| 62 72 65 61 6b 3b 0d 09 | 09 09 09 63 61 73 65 20 |break;..|...case |
|000010d0| 6b 45 78 70 61 6e 64 4d | 61 69 6c 65 72 43 72 65 |kExpandM|ailerCre|
|000010e0| 61 74 65 3a 0d 09 09 09 | 09 09 70 72 65 66 53 77 |ate:....|..prefSw|
|000010f0| 69 74 63 68 50 74 72 20 | 3d 20 26 6e 65 77 50 72 |itchPtr |= &newPr|
|00001100| 65 66 65 72 65 6e 63 65 | 73 2e 65 78 70 61 6e 64 |eference|s.expand|
|00001110| 4f 6e 43 72 65 61 74 65 | 3b 0d 09 09 09 09 09 62 |OnCreate|;......b|
|00001120| 72 65 61 6b 3b 0d 09 09 | 09 09 63 61 73 65 20 6b |reak;...|..case k|
|00001130| 45 78 70 61 6e 64 4d 61 | 69 6c 65 72 4f 70 65 6e |ExpandMa|ilerOpen|
|00001140| 3a 0d 09 09 09 09 09 70 | 72 65 66 53 77 69 74 63 |:......p|refSwitc|
|00001150| 68 50 74 72 20 3d 20 26 | 6e 65 77 50 72 65 66 65 |hPtr = &|newPrefe|
|00001160| 72 65 6e 63 65 73 2e 65 | 78 70 61 6e 64 4f 6e 4f |rences.e|xpandOnO|
|00001170| 70 65 6e 3b 0d 09 09 09 | 09 09 62 72 65 61 6b 3b |pen;....|..break;|
|00001180| 0d 09 09 09 7d 0d 09 09 | 09 2a 70 72 65 66 53 77 |....}...|.*prefSw|
|00001190| 69 74 63 68 50 74 72 20 | 3d 20 21 28 2a 70 72 65 |itchPtr |= !(*pre|
|000011a0| 66 53 77 69 74 63 68 50 | 74 72 29 3b 0d 09 09 09 |fSwitchP|tr);....|
|000011b0| 47 65 74 44 49 74 65 6d | 28 74 68 65 44 69 61 6c |GetDItem|(theDial|
|000011c0| 6f 67 2c 69 74 65 6d 2c | 26 69 54 79 70 65 2c 26 |og,item,|&iType,&|
|000011d0| 69 48 6e 64 6c 2c 26 69 | 52 65 63 74 29 3b 0d 09 |iHndl,&i|Rect);..|
|000011e0| 09 09 53 65 74 43 74 6c | 56 61 6c 75 65 28 28 43 |..SetCtl|Value((C|
|000011f0| 6f 6e 74 72 6f 6c 48 61 | 6e 64 6c 65 29 69 48 6e |ontrolHa|ndle)iHn|
|00001200| 64 6c 2c 2a 70 72 65 66 | 53 77 69 74 63 68 50 74 |dl,*pref|SwitchPt|
|00001210| 72 29 3b 0d 09 09 7d 0d | 09 09 0d 09 7d 20 77 68 |r);...}.|....} wh|
|00001220| 69 6c 65 20 28 69 74 65 | 6d 21 3d 6f 6b 20 26 26 |ile (ite|m!=ok &&|
|00001230| 20 69 74 65 6d 21 3d 63 | 61 6e 63 65 6c 29 3b 0d | item!=c|ancel);.|
|00001240| 09 0d 09 2f 2f 20 73 74 | 6f 72 65 20 74 68 65 20 |...// st|ore the |
|00001250| 6e 65 77 20 70 72 65 66 | 65 72 65 6e 63 65 73 20 |new pref|erences |
|00001260| 69 6e 20 74 68 65 20 67 | 50 72 65 66 65 72 65 6e |in the g|Preferen|
|00001270| 63 65 73 20 67 6c 6f 62 | 61 6c 0d 09 0d 09 69 66 |ces glob|al....if|
|00001280| 20 28 69 74 65 6d 3d 3d | 6f 6b 29 0d 09 09 42 6c | (item==|ok)...Bl|
|00001290| 6f 63 6b 4d 6f 76 65 28 | 26 6e 65 77 50 72 65 66 |ockMove(|&newPref|
|000012a0| 65 72 65 6e 63 65 73 2c | 26 67 50 72 65 66 65 72 |erences,|&gPrefer|
|000012b0| 65 6e 63 65 73 2c 73 69 | 7a 65 6f 66 28 4d 79 50 |ences,si|zeof(MyP|
|000012c0| 72 65 66 65 72 65 6e 63 | 65 73 29 29 3b 0d 09 0d |referenc|es));...|
|000012d0| 09 44 69 73 70 6f 73 65 | 44 69 61 6c 6f 67 28 74 |.Dispose|Dialog(t|
|000012e0| 68 65 44 69 61 6c 6f 67 | 29 3b 0d 7d 0d 0d 0d 2f |heDialog|);.}.../|
|000012f0| 2a 20 70 72 6f 63 65 73 | 73 65 73 20 70 72 69 6e |* proces|ses prin|
|00001300| 74 20 6d 65 6e 75 20 69 | 74 65 6d 20 2a 2f 0d 0d |t menu i|tem */..|
|00001310| 76 6f 69 64 20 43 6f 6d | 6d 50 72 69 6e 74 28 57 |void Com|mPrint(W|
|00001320| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 29 |indowPtr| window)|
|00001330| 0d 7b 0d 09 69 66 20 28 | 49 73 41 70 70 57 69 6e |.{..if (|IsAppWin|
|00001340| 64 6f 77 28 77 69 6e 64 | 6f 77 29 29 0d 09 09 53 |dow(wind|ow))...S|
|00001350| 65 6e 64 57 69 6e 64 6f | 77 4d 65 73 73 61 67 65 |endWindo|wMessage|
|00001360| 28 77 69 6e 64 6f 77 2c | 6b 50 72 69 6e 74 4d 65 |(window,|kPrintMe|
|00001370| 73 73 61 67 65 2c 6e 69 | 6c 29 3b 0d 7d 0d 0d 0d |ssage,ni|l);.}...|
|00001380| 2f 2a 20 70 72 6f 63 65 | 73 73 65 73 20 70 61 67 |/* proce|sses pag|
|00001390| 65 20 73 65 74 75 70 20 | 6d 65 6e 75 20 69 74 65 |e setup |menu ite|
|000013a0| 6d 20 2a 2f 0d 0d 76 6f | 69 64 20 43 6f 6d 6d 50 |m */..vo|id CommP|
|000013b0| 61 67 65 53 65 74 75 70 | 28 57 69 6e 64 6f 77 50 |ageSetup|(WindowP|
|000013c0| 74 72 20 77 69 6e 64 6f | 77 29 0d 7b 0d 09 57 49 |tr windo|w).{..WI|
|000013d0| 6e 66 6f 50 74 72 20 69 | 6e 66 6f 50 74 72 3b 0d |nfoPtr i|nfoPtr;.|
|000013e0| 09 63 68 61 72 20 68 53 | 74 61 74 65 3b 0d 09 42 |.char hS|tate;..B|
|000013f0| 6f 6f 6c 65 61 6e 20 63 | 68 61 6e 67 65 64 3b 0d |oolean c|hanged;.|
|00001400| 09 0d 09 53 65 74 43 75 | 72 73 6f 72 28 26 71 64 |...SetCu|rsor(&qd|
|00001410| 2e 61 72 72 6f 77 29 3b | 0d 0d 09 69 66 20 28 21 |.arrow);|...if (!|
|00001420| 49 73 41 70 70 57 69 6e | 64 6f 77 28 77 69 6e 64 |IsAppWin|dow(wind|
|00001430| 6f 77 29 29 0d 09 09 72 | 65 74 75 72 6e 3b 0d 09 |ow))...r|eturn;..|
|00001440| 0d 09 69 6e 66 6f 50 74 | 72 20 3d 20 42 65 67 69 |..infoPt|r = Begi|
|00001450| 6e 57 69 6e 64 6f 77 41 | 63 63 65 73 73 28 77 69 |nWindowA|ccess(wi|
|00001460| 6e 64 6f 77 2c 26 68 53 | 74 61 74 65 29 3b 0d 09 |ndow,&hS|tate);..|
|00001470| 0d 09 50 72 4f 70 65 6e | 28 29 3b 0d 09 63 68 61 |..PrOpen|();..cha|
|00001480| 6e 67 65 64 20 3d 20 50 | 72 53 74 6c 44 69 61 6c |nged = P|rStlDial|
|00001490| 6f 67 28 69 6e 66 6f 50 | 74 72 2d 3e 70 72 69 6e |og(infoP|tr->prin|
|000014a0| 74 52 65 63 6f 72 64 29 | 3b 09 2f 2f 20 64 69 73 |tRecord)|;.// dis|
|000014b0| 70 6c 61 79 20 70 61 67 | 65 20 73 65 74 75 70 20 |play pag|e setup |
|000014c0| 64 69 61 6c 6f 67 0d 09 | 69 66 20 28 50 72 45 72 |dialog..|if (PrEr|
|000014d0| 72 6f 72 28 29 21 3d 6e | 6f 45 72 72 29 0d 09 09 |ror()!=n|oErr)...|
|000014e0| 44 6f 45 72 72 6f 72 28 | 50 72 45 72 72 6f 72 28 |DoError(|PrError(|
|000014f0| 29 29 3b 0d 09 50 72 43 | 6c 6f 73 65 28 29 3b 0d |));..PrC|lose();.|
|00001500| 09 0d 09 69 66 20 28 63 | 68 61 6e 67 65 64 29 0d |...if (c|hanged).|
|00001510| 09 09 53 65 6e 64 57 69 | 6e 64 6f 77 4d 65 73 73 |..SendWi|ndowMess|
|00001520| 61 67 65 28 77 69 6e 64 | 6f 77 2c 6b 50 61 67 65 |age(wind|ow,kPage|
|00001530| 53 65 74 75 70 4d 65 73 | 73 61 67 65 2c 6e 69 6c |SetupMes|sage,nil|
|00001540| 29 3b 09 2f 2f 20 74 65 | 6c 6c 20 77 69 6e 64 6f |);.// te|ll windo|
|00001550| 77 20 74 68 61 74 20 77 | 65 20 63 68 61 6e 67 65 |w that w|e change|
|00001560| 64 20 74 68 69 6e 67 73 | 0d 0d 09 45 6e 64 57 69 |d things|...EndWi|
|00001570| 6e 64 6f 77 41 63 63 65 | 73 73 28 77 69 6e 64 6f |ndowAcce|ss(windo|
|00001580| 77 2c 68 53 74 61 74 65 | 29 3b 0d 7d 0d 0d 0d 2f |w,hState|);.}.../|
|00001590| 2a 20 73 68 6f 77 20 61 | 62 6f 75 74 20 62 6f 78 |* show a|bout box|
|000015a0| 20 2a 2f 0d 0d 76 6f 69 | 64 20 43 6f 6d 6d 41 62 | */..voi|d CommAb|
|000015b0| 6f 75 74 28 76 6f 69 64 | 29 0d 7b 0d 09 44 69 61 |out(void|).{..Dia|
|000015c0| 6c 6f 67 50 74 72 20 74 | 68 65 44 6c 67 3b 0d 09 |logPtr t|heDlg;..|
|000015d0| 73 68 6f 72 74 20 69 74 | 65 6d 3b 0d 09 09 0d 09 |short it|em;.....|
|000015e0| 74 68 65 44 6c 67 20 3d | 20 47 65 74 4e 65 77 44 |theDlg =| GetNewD|
|000015f0| 69 61 6c 6f 67 28 6b 41 | 62 6f 75 74 42 6f 78 49 |ialog(kA|boutBoxI|
|00001600| 44 2c 6e 69 6c 2c 28 57 | 69 6e 64 6f 77 50 74 72 |D,nil,(W|indowPtr|
|00001610| 29 2d 31 4c 29 3b 0d 09 | 4d 6f 64 61 6c 44 69 61 |)-1L);..|ModalDia|
|00001620| 6c 6f 67 28 6e 69 6c 2c | 26 69 74 65 6d 29 3b 0d |log(nil,|&item);.|
|00001630| 09 44 69 73 70 6f 73 65 | 44 69 61 6c 6f 67 28 74 |.Dispose|Dialog(t|
|00001640| 68 65 44 6c 67 29 3b 0d | 7d 0d 0d 0d 2f 2a 20 6e |heDlg);.|}.../* n|
|00001650| 65 77 20 63 6f 6d 6d 61 | 6e 64 2d 20 6d 61 6b 65 |ew comma|nd- make|
|00001660| 20 61 20 6e 65 77 20 64 | 72 61 77 69 6e 67 20 77 | a new d|rawing w|
|00001670| 69 6e 64 6f 77 20 2a 2f | 0d 0d 76 6f 69 64 20 43 |indow */|..void C|
|00001680| 6f 6d 6d 4e 65 77 28 76 | 6f 69 64 29 0d 7b 0d 09 |ommNew(v|oid).{..|
|00001690| 4d 61 6b 65 57 69 6e 64 | 6f 77 28 6b 44 72 61 77 |MakeWind|ow(kDraw|
|000016a0| 57 69 6e 64 6f 77 2c 6e | 69 6c 2c 6e 69 6c 2c 74 |Window,n|il,nil,t|
|000016b0| 72 75 65 29 3b 0d 7d 0d | 0d 0d 2f 2a 20 6f 70 65 |rue);.}.|../* ope|
|000016c0| 6e 20 63 6f 6d 6d 61 6e | 64 2d 20 6f 70 65 6e 20 |n comman|d- open |
|000016d0| 61 20 64 72 61 77 69 6e | 67 20 6f 72 20 61 20 6c |a drawin|g or a l|
|000016e0| 65 74 74 65 72 20 2a 2f | 0d 0d 76 6f 69 64 20 43 |etter */|..void C|
|000016f0| 6f 6d 6d 4f 70 65 6e 28 | 76 6f 69 64 29 0d 7b 0d |ommOpen(|void).{.|
|00001700| 09 53 74 61 6e 64 61 72 | 64 46 69 6c 65 52 65 70 |.Standar|dFileRep|
|00001710| 6c 79 20 73 66 52 65 70 | 6c 79 3b 0d 09 53 46 54 |ly sfRep|ly;..SFT|
|00001720| 79 70 65 4c 69 73 74 20 | 74 79 70 65 4c 69 73 74 |ypeList |typeList|
|00001730| 3b 0d 09 4f 53 45 72 72 | 20 65 72 72 3b 0d 09 57 |;..OSErr| err;..W|
|00001740| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 3b |indowPtr| window;|
|00001750| 0d 09 0d 09 74 79 70 65 | 4c 69 73 74 5b 30 5d 20 |....type|List[0] |
|00001760| 3d 20 6b 44 72 61 77 69 | 6e 67 54 79 70 65 3b 0d |= kDrawi|ngType;.|
|00001770| 09 74 79 70 65 4c 69 73 | 74 5b 31 5d 20 3d 20 6b |.typeLis|t[1] = k|
|00001780| 43 44 4c 74 72 4d 73 67 | 54 79 70 65 3b 0d 09 0d |CDLtrMsg|Type;...|
|00001790| 09 53 74 61 6e 64 61 72 | 64 47 65 74 46 69 6c 65 |.Standar|dGetFile|
|000017a0| 28 6e 69 6c 2c 32 2c 74 | 79 70 65 4c 69 73 74 2c |(nil,2,t|ypeList,|
|000017b0| 26 73 66 52 65 70 6c 79 | 29 3b 0d 09 69 66 20 28 |&sfReply|);..if (|
|000017c0| 73 66 52 65 70 6c 79 2e | 73 66 47 6f 6f 64 29 20 |sfReply.|sfGood) |
|000017d0| 7b 0d 09 09 65 72 72 20 | 3d 20 4c 6f 4f 70 65 6e |{...err |= LoOpen|
|000017e0| 28 74 72 75 65 2c 20 26 | 73 66 52 65 70 6c 79 2e |(true, &|sfReply.|
|000017f0| 73 66 46 69 6c 65 2c 20 | 6e 69 6c 2c 74 72 75 65 |sfFile, |nil,true|
|00001800| 2c 26 77 69 6e 64 6f 77 | 29 3b 09 2f 2f 20 63 61 |,&window|);.// ca|
|00001810| 6c 6c 20 74 68 72 6f 75 | 67 68 20 74 6f 20 6c 6f |ll throu|gh to lo|
|00001820| 77 2d 6c 65 76 65 6c 20 | 63 61 6c 6c 0d 09 09 69 |w-level |call...i|
|00001830| 66 20 28 65 72 72 21 3d | 6e 6f 45 72 72 29 0d 09 |f (err!=|noErr)..|
|00001840| 09 09 44 6f 45 72 72 6f | 72 28 65 72 72 29 3b 0d |..DoErro|r(err);.|
|00001850| 09 7d 0d 7d 0d 0d 0d 2f | 2a 20 6c 6f 77 2d 6c 65 |.}.}.../|* low-le|
|00001860| 76 65 6c 20 6f 70 65 6e | 20 28 63 61 6e 20 62 65 |vel open| (can be|
|00001870| 20 63 61 6c 6c 65 64 20 | 62 79 20 61 65 76 74 20 | called |by aevt |
|00001880| 6f 72 20 43 6f 6d 6d 4f | 70 65 6e 20 61 62 6f 76 |or CommO|pen abov|
|00001890| 65 29 20 2a 2f 0d 2f 2a | 20 6f 70 65 6e 73 20 65 |e) */./*| opens e|
|000018a0| 69 74 68 65 72 20 61 20 | 6c 65 74 74 65 72 20 28 |ither a |letter (|
|000018b0| 66 72 6f 6d 20 64 69 73 | 6b 20 6f 72 20 69 6e 20 |from dis|k or in |
|000018c0| 74 72 61 79 29 20 6f 72 | 20 61 20 64 72 61 77 69 |tray) or| a drawi|
|000018d0| 6e 67 20 2a 2f 0d 0d 4f | 53 45 72 72 20 4c 6f 4f |ng */..O|SErr LoO|
|000018e0| 70 65 6e 28 42 6f 6f 6c | 65 61 6e 20 64 69 73 6b |pen(Bool|ean disk|
|000018f0| 46 6f 72 6d 2c 20 46 53 | 53 70 65 63 20 2a 66 53 |Form, FS|Spec *fS|
|00001900| 70 65 63 2c 20 4c 65 74 | 74 65 72 53 70 65 63 20 |pec, Let|terSpec |
|00001910| 2a 6c 53 70 65 63 2c 42 | 6f 6f 6c 65 61 6e 20 73 |*lSpec,B|oolean s|
|00001920| 68 6f 77 57 69 6e 64 6f | 77 2c 0d 09 09 09 57 69 |howWindo|w,....Wi|
|00001930| 6e 64 6f 77 50 74 72 20 | 2a 6f 70 65 6e 65 64 57 |ndowPtr |*openedW|
|00001940| 69 6e 64 6f 77 29 0d 7b | 0d 09 57 69 6e 64 6f 77 |indow).{|..Window|
|00001950| 50 74 72 20 77 69 6e 64 | 6f 77 3b 0d 09 57 49 6e |Ptr wind|ow;..WIn|
|00001960| 66 6f 48 6e 64 6c 20 69 | 6e 66 6f 3b 0d 09 73 68 |foHndl i|nfo;..sh|
|00001970| 6f 72 74 20 77 54 79 70 | 65 3b 0d 09 4f 53 45 72 |ort wTyp|e;..OSEr|
|00001980| 72 20 65 72 72 3b 0d 09 | 46 49 6e 66 6f 20 66 49 |r err;..|FInfo fI|
|00001990| 6e 66 6f 3b 0d 09 4c 65 | 74 74 65 72 44 65 73 63 |nfo;..Le|tterDesc|
|000019a0| 72 69 70 74 6f 72 20 6c | 65 74 74 65 72 44 65 73 |riptor l|etterDes|
|000019b0| 63 3b 0d 09 76 6f 69 64 | 20 2a 6d 65 73 73 61 67 |c;..void| *messag|
|000019c0| 65 3b 0d 09 52 53 74 72 | 69 6e 67 20 6e 61 6d 65 |e;..RStr|ing name|
|000019d0| 3b 0d 09 0d 09 6e 61 6d | 65 2e 63 68 61 72 53 65 |;....nam|e.charSe|
|000019e0| 74 20 3d 20 73 6d 52 6f | 6d 61 6e 3b 0d 09 6e 61 |t = smRo|man;..na|
|000019f0| 6d 65 2e 64 61 74 61 4c | 65 6e 67 74 68 20 3d 20 |me.dataL|ength = |
|00001a00| 30 3b 0d 09 0d 09 2a 6f | 70 65 6e 65 64 57 69 6e |0;....*o|penedWin|
|00001a10| 64 6f 77 20 3d 20 6e 69 | 6c 3b 0d 0d 09 2f 2f 20 |dow = ni|l;...// |
|00001a20| 69 66 20 66 69 6c 65 20 | 69 73 20 6f 6e 20 64 69 |if file |is on di|
|00001a30| 73 6b 2c 20 70 75 74 20 | 61 6e 20 66 73 73 70 65 |sk, put |an fsspe|
|00001a40| 63 20 69 6e 20 74 68 65 | 20 6c 6f 61 64 20 6d 65 |c in the| load me|
|00001a50| 73 73 61 67 65 0d 09 0d | 09 69 66 20 28 64 69 73 |ssage...|.if (dis|
|00001a60| 6b 46 6f 72 6d 29 20 7b | 0d 09 09 65 72 72 20 3d |kForm) {|...err =|
|00001a70| 20 46 53 70 47 65 74 46 | 49 6e 66 6f 28 66 53 70 | FSpGetF|Info(fSp|
|00001a80| 65 63 2c 26 66 49 6e 66 | 6f 29 3b 0d 09 09 69 66 |ec,&fInf|o);...if|
|00001a90| 20 28 65 72 72 21 3d 6e | 6f 45 72 72 29 0d 09 09 | (err!=n|oErr)...|
|00001aa0| 09 72 65 74 75 72 6e 20 | 65 72 72 3b 0d 09 09 0d |.return |err;....|
|00001ab0| 09 09 73 77 69 74 63 68 | 20 28 66 49 6e 66 6f 2e |..switch| (fInfo.|
|00001ac0| 66 64 54 79 70 65 29 20 | 7b 0d 09 09 09 63 61 73 |fdType) |{....cas|
|00001ad0| 65 20 6b 44 72 61 77 69 | 6e 67 54 79 70 65 3a 0d |e kDrawi|ngType:.|
|00001ae0| 09 09 09 09 77 54 79 70 | 65 20 3d 20 6b 44 72 61 |....wTyp|e = kDra|
|00001af0| 77 57 69 6e 64 6f 77 3b | 0d 09 09 09 09 6d 65 73 |wWindow;|.....mes|
|00001b00| 73 61 67 65 20 3d 20 66 | 53 70 65 63 3b 0d 09 09 |sage = f|Spec;...|
|00001b10| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 63 61 73 65 |..break;|....case|
|00001b20| 20 6b 43 44 4c 74 72 4d | 73 67 54 79 70 65 3a 0d | kCDLtrM|sgType:.|
|00001b30| 09 09 09 09 77 54 79 70 | 65 20 3d 20 6b 44 72 61 |....wTyp|e = kDra|
|00001b40| 77 4d 61 69 6c 65 72 57 | 69 6e 64 6f 77 3b 0d 09 |wMailerW|indow;..|
|00001b50| 09 09 09 6c 65 74 74 65 | 72 44 65 73 63 2e 6f 6e |...lette|rDesc.on|
|00001b60| 44 69 73 6b 20 3d 20 74 | 72 75 65 3b 0d 09 09 09 |Disk = t|rue;....|
|00001b70| 09 42 6c 6f 63 6b 4d 6f | 76 65 28 66 53 70 65 63 |.BlockMo|ve(fSpec|
|00001b80| 2c 26 6c 65 74 74 65 72 | 44 65 73 63 2e 75 2e 66 |,&letter|Desc.u.f|
|00001b90| 69 6c 65 53 70 65 63 2c | 73 69 7a 65 6f 66 28 46 |ileSpec,|sizeof(F|
|00001ba0| 53 53 70 65 63 29 29 3b | 0d 09 09 09 09 6d 65 73 |SSpec));|.....mes|
|00001bb0| 73 61 67 65 20 3d 20 26 | 6c 65 74 74 65 72 44 65 |sage = &|letterDe|
|00001bc0| 73 63 3b 0d 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |sc;.....|break;..|
|00001bd0| 09 09 64 65 66 61 75 6c | 74 3a 0d 09 09 09 09 72 |..defaul|t:.....r|
|00001be0| 65 74 75 72 6e 20 6b 49 | 6e 74 65 72 6e 61 6c 45 |eturn kI|nternalE|
|00001bf0| 72 72 6f 72 3b 0d 09 09 | 7d 0d 09 7d 0d 09 65 6c |rror;...|}..}..el|
|00001c00| 73 65 20 7b 0d 09 09 77 | 54 79 70 65 20 3d 20 6b |se {...w|Type = k|
|00001c10| 44 72 61 77 4d 61 69 6c | 65 72 57 69 6e 64 6f 77 |DrawMail|erWindow|
|00001c20| 3b 09 2f 2f 20 70 75 74 | 20 61 20 6c 65 74 74 65 |;.// put| a lette|
|00001c30| 72 20 73 70 65 63 20 69 | 6e 74 6f 20 74 68 65 20 |r spec i|nto the |
|00001c40| 6d 65 73 73 61 67 65 20 | 66 6f 72 20 69 6e 20 74 |message |for in t|
|00001c50| 72 61 79 20 6c 65 74 74 | 65 72 73 0d 09 09 6c 65 |ray lett|ers...le|
|00001c60| 74 74 65 72 44 65 73 63 | 2e 6f 6e 44 69 73 6b 20 |tterDesc|.onDisk |
|00001c70| 3d 20 66 61 6c 73 65 3b | 0d 09 09 42 6c 6f 63 6b |= false;|...Block|
|00001c80| 4d 6f 76 65 28 6c 53 70 | 65 63 2c 26 6c 65 74 74 |Move(lSp|ec,&lett|
|00001c90| 65 72 44 65 73 63 2e 75 | 2e 6d 61 69 6c 62 6f 78 |erDesc.u|.mailbox|
|00001ca0| 53 70 65 63 2c 73 69 7a | 65 6f 66 28 4c 65 74 74 |Spec,siz|eof(Lett|
|00001cb0| 65 72 53 70 65 63 29 29 | 3b 0d 09 09 6d 65 73 73 |erSpec))|;...mess|
|00001cc0| 61 67 65 20 3d 20 26 6c | 65 74 74 65 72 44 65 73 |age = &l|etterDes|
|00001cd0| 63 3b 0d 09 7d 0d 09 09 | 0d 09 77 69 6e 64 6f 77 |c;..}...|..window|
|00001ce0| 20 3d 20 4d 61 6b 65 57 | 69 6e 64 6f 77 28 77 54 | = MakeW|indow(wT|
|00001cf0| 79 70 65 2c 6e 69 6c 2c | 6e 69 6c 2c 66 61 6c 73 |ype,nil,|nil,fals|
|00001d00| 65 29 3b 09 2f 2f 20 63 | 72 65 61 74 65 20 74 68 |e);.// c|reate th|
|00001d10| 65 20 77 69 6e 64 6f 77 | 0d 0d 09 69 66 20 28 77 |e window|...if (w|
|00001d20| 69 6e 64 6f 77 29 20 7b | 0d 09 09 69 6e 66 6f 20 |indow) {|...info |
|00001d30| 3d 20 47 65 74 57 69 6e | 64 6f 77 49 6e 66 6f 28 |= GetWin|dowInfo(|
|00001d40| 77 69 6e 64 6f 77 29 3b | 0d 09 09 53 65 6e 64 57 |window);|...SendW|
|00001d50| 69 6e 64 6f 77 4d 65 73 | 73 61 67 65 28 77 69 6e |indowMes|sage(win|
|00001d60| 64 6f 77 2c 6b 4c 6f 61 | 64 4d 65 73 73 61 67 65 |dow,kLoa|dMessage|
|00001d70| 2c 6d 65 73 73 61 67 65 | 29 3b 09 2f 2f 20 6c 6f |,message|);.// lo|
|00001d80| 61 64 20 74 68 65 20 77 | 69 6e 64 6f 77 20 64 61 |ad the w|indow da|
|00001d90| 74 61 20 28 6c 65 74 74 | 65 72 20 6f 72 20 64 72 |ta (lett|er or dr|
|00001da0| 61 77 69 6e 67 29 0d 09 | 09 69 66 20 28 64 69 73 |awing)..|.if (dis|
|00001db0| 6b 46 6f 72 6d 29 0d 09 | 09 09 42 6c 6f 63 6b 4d |kForm)..|..BlockM|
|00001dc0| 6f 76 65 28 66 53 70 65 | 63 2d 3e 6e 61 6d 65 2c |ove(fSpe|c->name,|
|00001dd0| 20 6e 61 6d 65 2e 62 6f | 64 79 20 2d 20 31 2c 20 | name.bo|dy - 1, |
|00001de0| 66 53 70 65 63 2d 3e 6e | 61 6d 65 5b 30 5d 20 2b |fSpec->n|ame[0] +|
|00001df0| 20 31 29 3b 0d 09 09 65 | 6c 73 65 20 7b 0d 09 09 | 1);...e|lse {...|
|00001e00| 09 28 2a 2a 69 6e 66 6f | 29 2e 73 61 76 65 64 20 |.(**info|).saved |
|00001e10| 3d 20 66 61 6c 73 65 3b | 0d 09 09 09 65 72 72 20 |= false;|....err |
|00001e20| 3d 20 53 4d 50 47 65 74 | 43 6f 6d 70 6f 6e 65 6e |= SMPGet|Componen|
|00001e30| 74 49 6e 66 6f 28 77 69 | 6e 64 6f 77 2c 20 31 2c |tInfo(wi|ndow, 1,|
|00001e40| 20 6b 53 4d 50 52 65 67 | 61 72 64 69 6e 67 2c 20 | kSMPReg|arding, |
|00001e50| 26 6e 61 6d 65 29 3b 09 | 2f 2f 20 73 65 74 20 74 |&name);.|// set t|
|00001e60| 68 65 20 66 69 6c 65 6e | 61 6d 65 20 74 6f 0d 09 |he filen|ame to..|
|00001e70| 09 09 42 6c 6f 63 6b 4d | 6f 76 65 28 6e 61 6d 65 |..BlockM|ove(name|
|00001e80| 2e 62 6f 64 79 20 2d 20 | 31 2c 66 53 70 65 63 2d |.body - |1,fSpec-|
|00001e90| 3e 6e 61 6d 65 2c 6e 61 | 6d 65 2e 64 61 74 61 4c |>name,na|me.dataL|
|00001ea0| 65 6e 67 74 68 2b 31 29 | 3b 09 09 2f 2f 20 74 68 |ength+1)|;..// th|
|00001eb0| 65 20 6c 65 74 74 65 72 | 27 73 20 73 75 62 6a 65 |e letter|'s subje|
|00001ec0| 63 74 0d 09 09 09 69 66 | 20 28 65 72 72 21 3d 6e |ct....if| (err!=n|
|00001ed0| 6f 45 72 72 29 0d 09 09 | 09 09 72 65 74 75 72 6e |oErr)...|..return|
|00001ee0| 20 65 72 72 3b 0d 09 09 | 7d 0d 09 09 53 65 74 57 | err;...|}...SetW|
|00001ef0| 54 69 74 6c 65 28 77 69 | 6e 64 6f 77 2c 20 6e 61 |Title(wi|ndow, na|
|00001f00| 6d 65 2e 62 6f 64 79 20 | 2d 20 31 29 3b 0d 09 09 |me.body |- 1);...|
|00001f10| 42 6c 6f 63 6b 4d 6f 76 | 65 28 66 53 70 65 63 2c |BlockMov|e(fSpec,|
|00001f20| 26 28 2a 69 6e 66 6f 29 | 2d 3e 66 69 6c 65 53 70 |&(*info)|->fileSp|
|00001f30| 65 63 2c 73 69 7a 65 6f | 66 28 46 53 53 70 65 63 |ec,sizeo|f(FSSpec|
|00001f40| 29 29 3b 09 2f 2f 20 63 | 6f 70 79 20 74 68 65 20 |));.// c|opy the |
|00001f50| 66 73 73 70 65 63 20 69 | 6e 74 6f 20 74 68 65 20 |fsspec i|nto the |
|00001f60| 77 69 6e 64 6f 77 20 69 | 6e 66 6f 0d 09 09 69 66 |window i|nfo...if|
|00001f70| 20 28 73 68 6f 77 57 69 | 6e 64 6f 77 29 0d 09 09 | (showWi|ndow)...|
|00001f80| 09 53 68 6f 77 57 69 6e | 64 6f 77 28 77 69 6e 64 |.ShowWin|dow(wind|
|00001f90| 6f 77 29 3b 0d 09 7d 0d | 09 2a 6f 70 65 6e 65 64 |ow);..}.|.*opened|
|00001fa0| 57 69 6e 64 6f 77 20 3d | 20 77 69 6e 64 6f 77 3b |Window =| window;|
|00001fb0| 0d 09 72 65 74 75 72 6e | 20 6e 6f 45 72 72 3b 0d |..return| noErr;.|
|00001fc0| 7d 0d 0d 0d 2f 2a 20 73 | 61 76 65 20 63 6f 6d 6d |}.../* s|ave comm|
|00001fd0| 61 6e 64 2d 20 72 65 74 | 75 72 6e 73 20 66 61 6c |and- ret|urns fal|
|00001fe0| 73 65 20 69 66 20 75 73 | 65 72 20 63 61 6e 63 65 |se if us|er cance|
|00001ff0| 6c 6c 65 64 20 73 61 76 | 65 20 2a 2f 0d 0d 42 6f |lled sav|e */..Bo|
|00002000| 6f 6c 65 61 6e 20 43 6f | 6d 6d 53 61 76 65 46 69 |olean Co|mmSaveFi|
|00002010| 6c 65 28 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |le(Windo|wPtr win|
|00002020| 64 6f 77 29 0d 7b 0d 09 | 57 49 6e 66 6f 48 6e 64 |dow).{..|WInfoHnd|
|00002030| 6c 20 69 6e 66 6f 3b 0d | 09 0d 09 69 66 20 28 21 |l info;.|...if (!|
|00002040| 49 73 41 70 70 57 69 6e | 64 6f 77 28 77 69 6e 64 |IsAppWin|dow(wind|
|00002050| 6f 77 29 29 0d 09 09 72 | 65 74 75 72 6e 20 74 72 |ow))...r|eturn tr|
|00002060| 75 65 3b 0d 09 0d 09 69 | 6e 66 6f 20 3d 20 47 65 |ue;....i|nfo = Ge|
|00002070| 74 57 69 6e 64 6f 77 49 | 6e 66 6f 28 77 69 6e 64 |tWindowI|nfo(wind|
|00002080| 6f 77 29 3b 0d 09 69 66 | 20 28 21 28 2a 2a 69 6e |ow);..if| (!(**in|
|00002090| 66 6f 29 2e 63 68 61 6e | 67 65 64 29 09 09 09 09 |fo).chan|ged)....|
|000020a0| 2f 2f 20 64 6f 6e 27 74 | 20 64 6f 20 61 6e 79 74 |// don't| do anyt|
|000020b0| 68 69 6e 67 20 69 66 20 | 77 65 20 68 61 76 65 6e |hing if |we haven|
|000020c0| 27 74 20 63 68 61 6e 67 | 65 64 20 74 68 65 20 64 |'t chang|ed the d|
|000020d0| 6f 63 75 6d 65 6e 74 0d | 09 09 72 65 74 75 72 6e |ocument.|..return|
|000020e0| 20 74 72 75 65 3b 0d 09 | 09 0d 09 69 66 20 28 21 | true;..|...if (!|
|000020f0| 28 2a 2a 69 6e 66 6f 29 | 2e 73 61 76 65 64 29 0d |(**info)|.saved).|
|00002100| 09 09 72 65 74 75 72 6e | 20 43 6f 6d 6d 53 61 76 |..return| CommSav|
|00002110| 65 41 73 46 69 6c 65 28 | 77 69 6e 64 6f 77 29 3b |eAsFile(|window);|
|00002120| 09 2f 2f 20 69 66 20 77 | 65 20 68 61 76 65 6e 27 |.// if w|e haven'|
|00002130| 74 20 73 61 76 65 64 20 | 62 65 66 6f 72 65 2c 20 |t saved |before, |
|00002140| 64 6f 20 61 20 73 61 76 | 65 20 61 73 0d 09 65 6c |do a sav|e as..el|
|00002150| 73 65 20 7b 0d 09 09 4c | 6f 53 61 76 65 46 69 6c |se {...L|oSaveFil|
|00002160| 65 28 77 69 6e 64 6f 77 | 2c 6b 53 4d 50 53 61 76 |e(window|,kSMPSav|
|00002170| 65 29 3b 09 2f 2f 20 63 | 61 6c 6c 20 74 68 65 20 |e);.// c|all the |
|00002180| 6c 6f 77 2d 6c 65 76 65 | 6c 20 73 61 76 65 0d 09 |low-leve|l save..|
|00002190| 09 72 65 74 75 72 6e 20 | 74 72 75 65 3b 0d 09 7d |.return |true;..}|
|000021a0| 0d 7d 0d 0d 0d 2f 2a 20 | 73 61 76 65 20 61 73 20 |.}.../* |save as |
|000021b0| 63 6f 6d 6d 61 6e 64 20 | 28 64 69 73 70 6c 61 79 |command |(display|
|000021c0| 20 73 74 61 6e 64 61 72 | 64 20 66 69 6c 65 20 74 | standar|d file t|
|000021d0| 6f 20 67 65 74 20 66 69 | 6c 65 6e 61 6d 65 20 61 |o get fi|lename a|
|000021e0| 6e 64 20 74 68 65 6e 20 | 63 61 6c 6c 20 4c 6f 53 |nd then |call LoS|
|000021f0| 61 76 65 46 69 6c 65 29 | 20 2a 2f 0d 0d 42 6f 6f |aveFile)| */..Boo|
|00002200| 6c 65 61 6e 20 43 6f 6d | 6d 53 61 76 65 41 73 46 |lean Com|mSaveAsF|
|00002210| 69 6c 65 28 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |ile(Wind|owPtr wi|
|00002220| 6e 64 6f 77 29 0d 7b 0d | 09 57 49 6e 66 6f 48 6e |ndow).{.|.WInfoHn|
|00002230| 64 6c 20 69 6e 66 6f 3b | 0d 09 53 74 61 6e 64 61 |dl info;|..Standa|
|00002240| 72 64 46 69 6c 65 52 65 | 70 6c 79 20 73 66 52 65 |rdFileRe|ply sfRe|
|00002250| 70 6c 79 3b 0d 09 53 74 | 72 32 35 35 20 70 72 6f |ply;..St|r255 pro|
|00002260| 6d 70 74 53 74 72 69 6e | 67 3b 0d 09 53 74 72 32 |mptStrin|g;..Str2|
|00002270| 35 35 20 64 65 66 61 75 | 6c 74 46 69 6c 65 6e 61 |55 defau|ltFilena|
|00002280| 6d 65 3b 0d 09 53 74 72 | 69 6e 67 50 74 72 20 66 |me;..Str|ingPtr f|
|00002290| 69 6c 65 4e 61 6d 65 3b | 0d 09 57 69 6e 64 6f 77 |ileName;|..Window|
|000022a0| 4b 69 6e 64 20 6b 69 6e | 64 3b 0d 09 0d 09 69 6e |Kind kin|d;....in|
|000022b0| 66 6f 20 3d 20 47 65 74 | 57 69 6e 64 6f 77 49 6e |fo = Get|WindowIn|
|000022c0| 66 6f 28 77 69 6e 64 6f | 77 29 3b 0d 0d 09 2f 2f |fo(windo|w);...//|
|000022d0| 20 67 65 74 20 74 68 65 | 20 64 65 66 61 75 6c 74 | get the| default|
|000022e0| 20 66 69 6c 65 6e 61 6d | 65 0d 09 0d 09 66 69 6c | filenam|e....fil|
|000022f0| 65 4e 61 6d 65 20 3d 20 | 28 2a 2a 69 6e 66 6f 29 |eName = |(**info)|
|00002300| 2e 66 69 6c 65 53 70 65 | 63 2e 6e 61 6d 65 3b 0d |.fileSpe|c.name;.|
|00002310| 09 69 66 20 28 66 69 6c | 65 4e 61 6d 65 5b 30 5d |.if (fil|eName[0]|
|00002320| 3d 3d 30 29 20 7b 0d 09 | 09 47 65 74 52 65 73 53 |==0) {..|.GetResS|
|00002330| 74 72 69 6e 67 28 64 65 | 66 61 75 6c 74 46 69 6c |tring(de|faultFil|
|00002340| 65 6e 61 6d 65 2c 6b 44 | 65 66 61 75 6c 74 46 69 |ename,kD|efaultFi|
|00002350| 6c 65 6e 61 6d 65 49 44 | 2c 6b 44 65 66 61 75 6c |lenameID|,kDefaul|
|00002360| 74 46 69 6c 65 6e 61 6d | 65 29 3b 0d 09 09 66 69 |tFilenam|e);...fi|
|00002370| 6c 65 4e 61 6d 65 20 3d | 20 64 65 66 61 75 6c 74 |leName =| default|
|00002380| 46 69 6c 65 6e 61 6d 65 | 3b 0d 09 7d 0d 09 09 0d |Filename|;..}....|
|00002390| 09 69 66 20 28 21 49 73 | 41 70 70 57 69 6e 64 6f |.if (!Is|AppWindo|
|000023a0| 77 28 77 69 6e 64 6f 77 | 29 29 0d 09 09 72 65 74 |w(window|))...ret|
|000023b0| 75 72 6e 20 74 72 75 65 | 3b 0d 09 0d 09 2f 2f 20 |urn true|;....// |
|000023c0| 67 65 74 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |get the |document|
|000023d0| 20 74 79 70 65 20 73 74 | 72 69 6e 67 20 66 6f 72 | type st|ring for|
|000023e0| 20 22 73 61 76 65 20 6c | 65 74 74 65 72 2f 64 72 | "save l|etter/dr|
|000023f0| 61 77 69 6e 67 20 61 73 | 3a 22 0d 09 0d 09 6b 69 |awing as|:"....ki|
|00002400| 6e 64 20 3d 20 47 65 74 | 57 69 6e 64 6f 77 4b 69 |nd = Get|WindowKi|
|00002410| 6e 64 28 77 69 6e 64 6f | 77 29 3b 0d 09 73 77 69 |nd(windo|w);..swi|
|00002420| 74 63 68 20 28 6b 69 6e | 64 29 20 7b 0d 09 09 63 |tch (kin|d) {...c|
|00002430| 61 73 65 20 6b 44 72 61 | 77 57 69 6e 64 6f 77 3a |ase kDra|wWindow:|
|00002440| 0d 09 09 09 47 65 74 52 | 65 73 53 74 72 69 6e 67 |....GetR|esString|
|00002450| 28 70 72 6f 6d 70 74 53 | 74 72 69 6e 67 2c 6b 50 |(promptS|tring,kP|
|00002460| 72 6f 6d 70 74 53 74 72 | 69 6e 67 49 44 2c 6b 50 |romptStr|ingID,kP|
|00002470| 72 6f 6d 70 74 53 74 72 | 69 6e 67 29 3b 0d 09 09 |romptStr|ing);...|
|00002480| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 6b |.break;.|..case k|
|00002490| 44 72 61 77 4d 61 69 6c | 65 72 57 69 6e 64 6f 77 |DrawMail|erWindow|
|000024a0| 3a 0d 09 09 09 47 65 74 | 52 65 73 53 74 72 69 6e |:....Get|ResStrin|
|000024b0| 67 28 70 72 6f 6d 70 74 | 53 74 72 69 6e 67 2c 6b |g(prompt|String,k|
|000024c0| 53 61 76 65 4c 65 74 74 | 65 72 41 73 49 44 2c 6b |SaveLett|erAsID,k|
|000024d0| 53 61 76 65 4c 65 74 74 | 65 72 41 73 29 3b 0d 09 |SaveLett|erAs);..|
|000024e0| 09 09 62 72 65 61 6b 3b | 0d 09 7d 0d 0d 09 53 74 |..break;|..}...St|
|000024f0| 61 6e 64 61 72 64 50 75 | 74 46 69 6c 65 28 70 72 |andardPu|tFile(pr|
|00002500| 6f 6d 70 74 53 74 72 69 | 6e 67 2c 66 69 6c 65 4e |omptStri|ng,fileN|
|00002510| 61 6d 65 2c 26 73 66 52 | 65 70 6c 79 29 3b 0d 09 |ame,&sfR|eply);..|
|00002520| 69 66 20 28 73 66 52 65 | 70 6c 79 2e 73 66 47 6f |if (sfRe|ply.sfGo|
|00002530| 6f 64 29 20 7b 0d 20 20 | 20 20 09 42 6c 6f 63 6b |od) {. | .Block|
|00002540| 4d 6f 76 65 28 26 73 66 | 52 65 70 6c 79 2e 73 66 |Move(&sf|Reply.sf|
|00002550| 46 69 6c 65 2c 26 28 28 | 2a 2a 69 6e 66 6f 29 2e |File,&((|**info).|
|00002560| 66 69 6c 65 53 70 65 63 | 29 2c 73 69 7a 65 6f 66 |fileSpec|),sizeof|
|00002570| 28 46 53 53 70 65 63 29 | 29 3b 0d 09 09 4c 6f 53 |(FSSpec)|);...LoS|
|00002580| 61 76 65 46 69 6c 65 28 | 77 69 6e 64 6f 77 2c 6b |aveFile(|window,k|
|00002590| 53 4d 50 53 61 76 65 41 | 73 29 3b 0d 09 09 72 65 |SMPSaveA|s);...re|
|000025a0| 74 75 72 6e 20 74 72 75 | 65 3b 0d 09 7d 0d 09 65 |turn tru|e;..}..e|
|000025b0| 6c 73 65 0d 09 09 72 65 | 74 75 72 6e 20 66 61 6c |lse...re|turn fal|
|000025c0| 73 65 3b 0d 7d 0d 0d 0d | 2f 2a 20 6c 6f 77 2d 6c |se;.}...|/* low-l|
|000025d0| 65 76 65 6c 20 73 61 76 | 65 20 66 69 6c 65 20 2a |evel sav|e file *|
|000025e0| 2f 0d 0d 76 6f 69 64 20 | 4c 6f 53 61 76 65 46 69 |/..void |LoSaveFi|
|000025f0| 6c 65 28 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |le(Windo|wPtr win|
|00002600| 64 6f 77 2c 53 4d 50 53 | 61 76 65 54 79 70 65 20 |dow,SMPS|aveType |
|00002610| 68 6f 77 29 0d 7b 0d 09 | 53 65 6e 64 57 69 6e 64 |how).{..|SendWind|
|00002620| 6f 77 4d 65 73 73 61 67 | 65 28 77 69 6e 64 6f 77 |owMessag|e(window|
|00002630| 2c 6b 53 61 76 65 4d 65 | 73 73 61 67 65 2c 28 76 |,kSaveMe|ssage,(v|
|00002640| 6f 69 64 20 2a 29 68 6f | 77 29 3b 09 2f 2f 20 6a |oid *)ho|w);.// j|
|00002650| 75 73 74 20 73 65 6e 64 | 20 74 68 65 20 77 69 6e |ust send| the win|
|00002660| 64 6f 77 20 74 68 65 20 | 73 61 76 65 20 6d 65 73 |dow the |save mes|
|00002670| 73 61 67 65 0d 7d 0d 0d | 0d 2f 2a 20 77 61 72 6e |sage.}..|./* warn|
|00002680| 20 74 68 65 20 75 73 65 | 72 20 74 68 61 74 20 77 | the use|r that w|
|00002690| 65 27 72 65 20 67 6f 69 | 6e 67 20 74 6f 20 63 6c |e're goi|ng to cl|
|000026a0| 6f 73 65 20 74 68 65 20 | 77 69 6e 64 6f 77 20 76 |ose the |window v|
|000026b0| 69 61 20 61 20 22 44 6f | 20 79 6f 75 20 77 61 6e |ia a "Do| you wan|
|000026c0| 74 20 74 6f 20 73 61 76 | 65 20 63 68 61 6e 67 65 |t to sav|e change|
|000026d0| 73 22 20 64 69 61 6c 6f | 67 20 2a 2f 0d 0d 42 6f |s" dialo|g */..Bo|
|000026e0| 6f 6c 65 61 6e 20 57 61 | 72 6e 4f 6e 57 69 6e 64 |olean Wa|rnOnWind|
|000026f0| 6f 77 43 6c 6f 73 65 28 | 57 69 6e 64 6f 77 50 74 |owClose(|WindowPt|
|00002700| 72 20 77 69 6e 64 6f 77 | 29 0d 7b 0d 09 73 68 6f |r window|).{..sho|
|00002710| 72 74 20 69 74 65 6d 3b | 0d 09 57 49 6e 66 6f 50 |rt item;|..WInfoP|
|00002720| 74 72 20 69 6e 66 6f 50 | 74 72 3b 0d 09 63 68 61 |tr infoP|tr;..cha|
|00002730| 72 20 68 53 74 61 74 65 | 3b 0d 09 42 6f 6f 6c 65 |r hState|;..Boole|
|00002740| 61 6e 20 72 65 74 75 72 | 6e 56 61 6c 75 65 3b 0d |an retur|nValue;.|
|00002750| 09 57 69 6e 64 6f 77 4b | 69 6e 64 20 6b 69 6e 64 |.WindowK|ind kind|
|00002760| 3b 0d 09 53 74 72 36 33 | 20 64 6f 63 75 6d 65 6e |;..Str63| documen|
|00002770| 74 4b 69 6e 64 2c 71 75 | 69 74 52 65 61 73 6f 6e |tKind,qu|itReason|
|00002780| 3b 0d 09 0d 09 2f 2f 20 | 67 65 74 20 64 6f 63 75 |;....// |get docu|
|00002790| 6d 65 6e 74 20 74 79 70 | 65 20 66 6f 72 20 22 41 |ment typ|e for "A|
|000027a0| 72 65 20 79 6f 75 20 73 | 75 72 65 20 79 6f 75 20 |re you s|ure you |
|000027b0| 77 61 6e 74 20 74 6f 20 | 63 6c 6f 73 65 20 74 68 |want to |close th|
|000027c0| 65 20 64 72 61 77 69 6e | 67 2f 6c 65 74 74 65 72 |e drawin|g/letter|
|000027d0| 20 78 78 78 22 0d 09 0d | 09 6b 69 6e 64 20 3d 20 | xxx"...|.kind = |
|000027e0| 47 65 74 57 69 6e 64 6f | 77 4b 69 6e 64 28 77 69 |GetWindo|wKind(wi|
|000027f0| 6e 64 6f 77 29 3b 0d 09 | 73 77 69 74 63 68 20 28 |ndow);..|switch (|
|00002800| 6b 69 6e 64 29 20 7b 0d | 09 09 63 61 73 65 20 6b |kind) {.|..case k|
|00002810| 44 72 61 77 57 69 6e 64 | 6f 77 3a 0d 09 09 09 47 |DrawWind|ow:....G|
|00002820| 65 74 52 65 73 53 74 72 | 69 6e 67 28 64 6f 63 75 |etResStr|ing(docu|
|00002830| 6d 65 6e 74 4b 69 6e 64 | 2c 6b 44 72 61 77 69 6e |mentKind|,kDrawin|
|00002840| 67 49 44 2c 6b 44 72 61 | 77 69 6e 67 29 3b 0d 09 |gID,kDra|wing);..|
|00002850| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 20 |..break;|...case |
|00002860| 6b 44 72 61 77 4d 61 69 | 6c 65 72 57 69 6e 64 6f |kDrawMai|lerWindo|
|00002870| 77 3a 0d 09 09 09 47 65 | 74 52 65 73 53 74 72 69 |w:....Ge|tResStri|
|00002880| 6e 67 28 64 6f 63 75 6d | 65 6e 74 4b 69 6e 64 2c |ng(docum|entKind,|
|00002890| 6b 4c 65 74 74 65 72 49 | 44 2c 6b 4c 65 74 74 65 |kLetterI|D,kLette|
|000028a0| 72 29 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 7d |r);....b|reak;..}|
|000028b0| 0d 09 0d 09 2f 2f 20 67 | 65 74 20 65 69 74 68 65 |....// g|et eithe|
|000028c0| 72 20 74 68 65 20 22 62 | 65 66 6f 72 65 20 71 75 |r the "b|efore qu|
|000028d0| 69 74 74 69 6e 67 22 20 | 6f 72 20 22 62 65 66 6f |itting" |or "befo|
|000028e0| 72 65 20 63 6c 6f 73 69 | 6e 67 22 20 73 74 72 69 |re closi|ng" stri|
|000028f0| 6e 67 2c 20 64 65 70 65 | 6e 64 69 6e 67 20 6f 6e |ng, depe|nding on|
|00002900| 20 77 68 69 63 68 20 77 | 65 27 72 65 20 64 6f 69 | which w|e're doi|
|00002910| 6e 67 0d 09 0d 09 69 66 | 20 28 67 44 6f 6e 65 29 |ng....if| (gDone)|
|00002920| 0d 09 09 47 65 74 52 65 | 73 53 74 72 69 6e 67 28 |...GetRe|sString(|
|00002930| 71 75 69 74 52 65 61 73 | 6f 6e 2c 6b 51 75 69 74 |quitReas|on,kQuit|
|00002940| 74 69 6e 67 49 44 2c 6b | 51 75 69 74 74 69 6e 67 |tingID,k|Quitting|
|00002950| 29 3b 0d 09 65 6c 73 65 | 0d 09 09 47 65 74 52 65 |);..else|...GetRe|
|00002960| 73 53 74 72 69 6e 67 28 | 71 75 69 74 52 65 61 73 |sString(|quitReas|
|00002970| 6f 6e 2c 6b 43 6c 6f 73 | 69 6e 67 49 44 2c 6b 43 |on,kClos|ingID,kC|
|00002980| 6c 6f 73 69 6e 67 29 3b | 0d 09 09 0d 09 69 6e 66 |losing);|.....inf|
|00002990| 6f 50 74 72 20 3d 20 42 | 65 67 69 6e 57 69 6e 64 |oPtr = B|eginWind|
|000029a0| 6f 77 41 63 63 65 73 73 | 28 77 69 6e 64 6f 77 2c |owAccess|(window,|
|000029b0| 26 68 53 74 61 74 65 29 | 3b 0d 09 50 61 72 61 6d |&hState)|;..Param|
|000029c0| 54 65 78 74 28 64 6f 63 | 75 6d 65 6e 74 4b 69 6e |Text(doc|umentKin|
|000029d0| 64 2c 69 6e 66 6f 50 74 | 72 2d 3e 66 69 6c 65 53 |d,infoPt|r->fileS|
|000029e0| 70 65 63 2e 6e 61 6d 65 | 2c 71 75 69 74 52 65 61 |pec.name|,quitRea|
|000029f0| 73 6f 6e 2c 6e 69 6c 29 | 3b 0d 09 45 6e 64 57 69 |son,nil)|;..EndWi|
|00002a00| 6e 64 6f 77 41 63 63 65 | 73 73 28 77 69 6e 64 6f |ndowAcce|ss(windo|
|00002a10| 77 2c 68 53 74 61 74 65 | 29 3b 0d 09 0d 09 53 65 |w,hState|);....Se|
|00002a20| 74 43 75 72 73 6f 72 28 | 26 71 64 2e 61 72 72 6f |tCursor(|&qd.arro|
|00002a30| 77 29 3b 0d 09 69 74 65 | 6d 20 3d 20 53 74 6f 70 |w);..ite|m = Stop|
|00002a40| 41 6c 65 72 74 28 6b 57 | 61 72 6e 43 6c 6f 73 65 |Alert(kW|arnClose|
|00002a50| 49 44 2c 6e 69 6c 29 3b | 0d 09 0d 09 73 77 69 74 |ID,nil);|....swit|
|00002a60| 63 68 20 28 69 74 65 6d | 29 20 7b 0d 09 09 63 61 |ch (item|) {...ca|
|00002a70| 73 65 20 63 61 6e 63 65 | 6c 3a 0d 09 09 09 72 65 |se cance|l:....re|
|00002a80| 74 75 72 6e 56 61 6c 75 | 65 20 3d 20 66 61 6c 73 |turnValu|e = fals|
|00002a90| 65 3b 09 2f 2f 20 69 66 | 20 74 68 65 79 20 63 61 |e;.// if| they ca|
|00002aa0| 6e 63 65 6c 2c 20 72 65 | 74 75 72 6e 20 66 61 6c |ncel, re|turn fal|
|00002ab0| 73 65 20 74 6f 20 63 61 | 6e 63 65 6c 20 74 68 65 |se to ca|ncel the|
|00002ac0| 20 63 6c 6f 73 65 0d 09 | 09 09 62 72 65 61 6b 3b | close..|..break;|
|00002ad0| 0d 09 09 63 61 73 65 20 | 6b 44 6f 6e 74 53 61 76 |...case |kDontSav|
|00002ae0| 65 3a 0d 09 09 09 72 65 | 74 75 72 6e 56 61 6c 75 |e:....re|turnValu|
|00002af0| 65 20 3d 20 74 72 75 65 | 3b 09 09 2f 2f 20 69 66 |e = true|;..// if|
|00002b00| 20 74 68 65 79 20 63 6c | 69 63 6b 20 64 6f 6e 27 | they cl|ick don'|
|00002b10| 74 20 73 61 76 65 2c 20 | 72 65 74 75 72 6e 20 74 |t save, |return t|
|00002b20| 72 75 65 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 0d |rue to c|ontinue.|
|00002b30| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00002b40| 20 6f 6b 3a 0d 09 09 09 | 72 65 74 75 72 6e 56 61 | ok:....|returnVa|
|00002b50| 6c 75 65 20 3d 20 43 6f | 6d 6d 53 61 76 65 46 69 |lue = Co|mmSaveFi|
|00002b60| 6c 65 28 77 69 6e 64 6f | 77 29 3b 09 2f 2f 20 69 |le(windo|w);.// i|
|00002b70| 66 20 74 68 65 79 20 63 | 6c 69 63 6b 20 79 65 73 |f they c|lick yes|
|00002b80| 2c 20 72 65 74 75 72 6e | 20 74 72 75 65 20 69 66 |, return| true if|
|00002b90| 20 74 68 65 20 73 61 76 | 65 20 77 6f 72 6b 73 0d | the sav|e works.|
|00002ba0| 09 09 09 62 72 65 61 6b | 3b 0d 09 7d 0d 09 72 65 |...break|;..}..re|
|00002bb0| 74 75 72 6e 20 72 65 74 | 75 72 6e 56 61 6c 75 65 |turn ret|urnValue|
|00002bc0| 3b 0d 7d 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.}.....|........|
|00002bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c00| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00002c10| 00 4e 56 00 00 2f 2e 00 | 08 4e ad 02 a2 2f 2e 00 |.NV../..|.N.../..|
|00002c20| 08 4e ba 05 c6 4e 5e 2e | 9f 4e 75 00 00 4e 56 00 |.N...N^.|.Nu..NV.|
|00002c30| 0a 63 6f 6d 6d 61 6e 64 | 73 2e 63 00 02 00 00 00 |.command|s.c.....|
|00002c40| 54 45 58 54 4d 50 53 20 | 01 00 00 00 00 c0 00 00 |TEXTMPS |........|
|00002c50| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 c0 |..TEXTMP|S ......|
|00002c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c70| 00 00 a5 3e d5 21 00 00 | 2b 44 00 00 01 ac 75 00 |...>.!..|+D....u.|
|00002c80| 00 4e 56 00 00 2f 0c 28 | 6e 00 08 20 54 4a a8 00 |.NV../.(|n.. TJ..|
|00002c90| 66 67 16 42 a7 42 67 20 | 54 2f 28 00 66 4e ad 1a |fg.B.Bg |T/(.fN..|
|00002ca0| 7a 20 54 70 00 21 40 00 | 66 2f 2e 00 08 4e ba ff |z Tp.!@.|f/...N..|
|00002cb0| b6 28 5f 4e 5e 2e 9f 4e | 75 4e 56 00 00 48 e7 00 |.(_N^..N|uNV..H..|
|00002cc0| 18 26 6e 00 08 28 4b 20 | 54 4a a8 00 7e 67 1c 2f |.&n..(K |TJ..~g./|
|00002cd0| 0b 2f 28 00 7e 4e ad 1c | 6a 20 54 2f 28 00 7e 4e |./(.~N..|j T/(.~N|
|00002ce0| ad 0f aa 20 54 70 00 21 | 40 00 7e 2f 0b 4e ba 00 |... Tp.!|@.~/.N..|
|00002cf0| 0e 4c df 18 00 4e 5e 2e | 9f 4e 75 00 00 4e 56 00 |.L...N^.|.Nu..NV.|
|00002d00| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 20 |...H..Mo|naco... |
|00002d10| 00 d1 00 94 00 00 00 00 | 00 00 00 00 fc 19 fc 18 |........|........|
|00002d20| fc 19 fc 19 00 c6 00 06 | 00 04 00 55 00 57 03 2a |........|...U.W.*|
|00002d30| 02 ca 00 55 00 57 03 2a | 02 ca a7 14 51 7b 00 00 |...U.W.*|....Q{..|
|00002d40| 0e 6e 00 00 0e 6e 00 00 | 0d 46 01 00 00 00 00 1e |.n...n..|.F......|
|00002d50| 00 55 00 57 03 2a 02 ca | 00 55 00 57 03 2a 02 ca |.U.W.*..|.U.W.*..|
|00002d60| 00 00 0d 46 00 00 00 00 | 00 00 00 00 00 00 00 00 |...F....|........|
|00002d70| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 01 0b |.....n..|.n...>..|
|00002d80| 33 10 0f 6e 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |3..n....|.>..MPSR|
|00002d90| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00002da0| 03 f0 ff ff 00 00 00 4c | 00 00 00 00 00 00 00 00 |.......L|........|
|00002db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+